<div class="row" ng-init="$ctrl.initModuleForm();">
  <div class="col-sm-12">
    <form
      ng-class="{'submitted': submitted}"
      ng-submit="$ctrl.saveModuleData()"
      id="module-{{$ctrl.data.moduleId}}"
    >
      <actions back-url="$ctrl.backUrl" ng-if="$ctrl.backUrl"></actions>
      <div class="card mb-4">
        <div class="card-header text-center">
          <h4 class="card-title"></h4>
        </div>
        <div class="card-body">
          <div class="row">
            <div class="col-sm-12">
              <div
                ng-repeat="prop in $ctrl.data.dataProperties track by $index"
              >
                <module-form-editor
                  is-show-title="$ctrl.isShowTitle"
                  column-title="prop.title"
                  data="$ctrl.data.jItem[prop.name]"
                  ng-if="!prop.isSelect"
                ></module-form-editor>
                <div ng-if="prop.isSelect" class="mb-3">
                  <label
                    class="control-label"
                    ng-if="$ctrl.isShowTitle"
                    ng-bind="prop.title"
                  ></label>
                  <!-- <mix-select-icons ng-if="prop.dataType=='icon'" options="prop.options" data="$ctrl.data.jItem[prop.name]['value']"></mix-select-icons> -->

                  <select
                    ng-if="prop.dataType!='icon'"
                    class="form-select form-control"
                    ng-model="$ctrl.data.jItem[prop.name]['value']"
                  >
                    <option
                      ng-repeat="item in prop.options track by $index"
                      ng-value="item"
                    >
                      {{item}}
                    </option>
                  </select>
                  <!-- <br/><br/>
                                    <input type="text" class="form-control form-control-sm" ng-model="$ctrl.data.jItem[prop.name]['value']" placeholder="Other options" /> -->
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-12">
              <button
                type="submit"
                class="btn btn-primary btn-round pull-right"
              >
                Submit
              </button>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
